<ui:composition xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets" 
    xmlns:a4j="http://richfaces.org/a4j" 
    xmlns:rich="http://richfaces.org/rich"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

	
	<h:form>
 	
 	<a4j:outputPanel id="out7">    		
    	
		<rich:panel header="Registro Vendedor" style="width: 400px">
		
			<h:panelGrid columns="3">
			
				<h:outputText value="#{missatge['registre.nom']}" />
				<h:inputText value="#{venedorVO.nom}" id="venedorNom" required="true" 
					requiredMessage="es requereix"  
					validatorMessage="Valor entre 1-40 caràcters" label="#{missatge['registre.nom']}" >
					<f:validateLength minimum="1" maximum="40" ></f:validateLength>
				</h:inputText>		
				<rich:message id="venedorNomMsg" for="venedorNom" />
					
				<h:outputText value="#{missatge['registre.cognoms']}" />
				<h:inputText value="#{venedorVO.cognoms}" id="venedorCognoms" required="true" 
				   	requiredMessage="es requereix"  
				   	validatorMessage="Valor entre 1-50 caràcters" label="#{missatge['registre.cognoms']}" >
				   	<f:validateLength minimum="1" maximum="50" ></f:validateLength>
				</h:inputText>		
				<rich:message id="venedorCognomsMsg" for="venedorCognoms" />
				
				<h:outputText value="#{missatge['registre.adreca']}" />
				<h:inputText value="#{venedorVO.adreca}" id="venedorAdreca" required="true" 
				   	requiredMessage="es requereix"  
				   	validatorMessage="Valor entre 1-50 caràcters" label="#{missatge['registre.adreca']}" >
				   	<f:validateLength minimum="1" maximum="50" ></f:validateLength>
				</h:inputText>		
				<rich:message id="venedorAdrecaMsg" for="venedorAdreca" />
				
				<h:outputText value="#{missatge['registre.localitat']}" />
				<h:inputText value="#{venedorVO.localitat}" id="venedorLocalitat" required="true" 
				   	requiredMessage="es requereix"  
				   	validatorMessage="Valor entre 1-50 caràcters" label="#{missatge['registre.localitat']}" >
				   	<f:validateLength minimum="1" maximum="50" ></f:validateLength>
				</h:inputText>		
				<rich:message id="venedorLocalitatMsg" for="venedorLocalitat" />
		
				<h:outputText value="#{missatge['registre.codi']}" />
				<h:inputText value="#{venedorVO.codi}" id="venedorCodi" required="true" 
				   	requiredMessage="es requereix"  
				   	validatorMessage="Valor entre 1-8 caràcters" label="#{missatge['registre.codi']}" >
				   	<f:validateLength minimum="1" maximum="8" ></f:validateLength>
				</h:inputText>		
				<rich:message id="venedorCodiMsg" for="venedorCodi" />
				
				<h:outputText value="#{missatge['registre.provincia']}" />
				<h:inputText value="#{venedorVO.provincia}" id="venedorProvincia" required="true" 
				   	requiredMessage="es requereix"  
				   	validatorMessage="Valor entre 1-30 caràcters" label="#{missatge['registre.provincia']}" >
				   	<f:validateLength minimum="1" maximum="8" ></f:validateLength>
				</h:inputText>		
				<rich:message id="venedorProvinciaMsg" for="venedorProvincia" />

				<h:outputText value="#{missatge['registre.telefon']}" />
				<h:inputText value="#{venedorVO.telefon}" id="venedorTelefon" required="true" 
				   	requiredMessage="es requereix"  
				   	validatorMessage="Valor entre 1-30 caràcters" label="#{missatge['registre.telefon']}" >
				   	<f:validateLength minimum="1" maximum="8" ></f:validateLength>
				</h:inputText>		
				<rich:message id="venedorTelefonMsg" for="venedorTelefon" />
				
				<h:outputText value="#{missatge['registre.email']}" />
				<h:inputText value="#{venedorVO.email}" id="venedorEmail" required="true" 
				   	requiredMessage="es requereix"  
				   	validatorMessage="Valor entre 1-30 caràcters" label="#{missatge['registre.email']}" >
				   	<f:validateLength minimum="1" maximum="8" ></f:validateLength>
				</h:inputText>		
				<rich:message id="venedorEmailMsg" for="venedorEmail" />
				
				<h:outputText value="#{missatge['registre.email2']}" />
				<h:inputText value="#{venedorVO.email2}" id="venedorEmail2" required="true" 
				   	requiredMessage="es requereix"  
				   	validatorMessage="Valor entre 1-30 caràcters" label="#{missatge['registre.email2']}" >
				   	<f:validateLength minimum="1" maximum="8" ></f:validateLength>
				</h:inputText>		
				<rich:message id="venedorEmail2Msg" for="venedorEmail2" />

				
				
				<h:outputText value="#{missatge['registre.password']}" />
				<h:inputText value="#{venedorVO.password}" id="venedorPassword" required="true" 
				   	requiredMessage="es requereix"  
				   	validatorMessage="Valor entre 1-30 caràcters" label="#{missatge['registre.password']}" >
				   	<f:validateLength minimum="1" maximum="8" ></f:validateLength>
				</h:inputText>		
				<rich:message id="venedorPasswordMsg" for="venedorPassword" />

				<h:outputText value="#{missatge['registre.acord']}" />
				<h:selectBooleanCheckbox value="#{venedorVO.acord}">
					<a4j:ajax event="click" render="@this"/>
				</h:selectBooleanCheckbox>
				
						 
		 		<a4j:commandLink styleClass="no-decor" border="0" execute="@form"
					render="out8" actionListener="#{venedorVO.editarNou}" >                     
					<h:graphicImage value="/images/24-book-blue.png" alt="Registre venedor" style="align:left;border:0"/>                     
   				</a4j:commandLink>
						 
				</h:panelGrid>
		             
			</rich:panel>
		
	    </a4j:outputPanel>
	 
 	</h:form>
 	
</ui:composition>